#ifndef __M_CCONSUMER_H__
#define __M_CCONSUMER_H__
#include"../mqcommon/mq_msg.pb.h"
#include"../mqcommon/helper.hpp"
#include"../mqcommon/logger.hpp"
#include<functional>
#include<mutex>
#include<memory>

namespace mq{
    using ConsumerCallback = std::function<void(const std::string&,const BasicProperty* bp,const std::string&)>;
    struct Consumer{
        using ptr = std::shared_ptr<Consumer>;
        std::string tag;
        std::string qname;
        bool auto_ack;
        ConsumerCallback cb;
        Consumer(){}
        Consumer(const std::string& ctag,const std::string& cqname,bool cack,const ConsumerCallback& ccb)
        :tag(ctag),
        qname(cqname),
        auto_ack(cack),
        cb(ccb){}
    };
}

#endif